package com.siriframe.cloud.home.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.siriframe.cloud.DemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @DubboReference
    private DemoService demoService;

    @GetMapping("/testDubbo")
    @SentinelResource("home-demo-testDubbo")
    public String testDubbo(){
        String res = demoService.sayHello("dubbo");
        return res;
    }

}
